<%@include file="header.jsp"%>
<c:set var="t" value="true" />
<script>
	function formReset() {
		document.getElementById("origin").value = "";
		document.getElementById("origin2").reset();
		document.getElementById("origin3").reset();
		document.getElementById("origin4").reset();
		document.getElementById("origin5").reset();
	}
</script>
<form action="AddUser" method=post>
	<br />
	<table class="table table-striped">
		<tr>
			<td><fmt:message key="label.user.userName" /></td>
			<td><input type="text" name="username" id="origin" tabindex=1
				value="${param['username']}" size=15 maxlength=20 /> <span
				class="error">${errors.origin}</span></td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.password" /></td>
			<td><input type="password" name="userpassword" id="origin2"
				tabindex=2 value="${param['userpassword']}" size=15 maxlength=30 />
				<span class="error">${errors.origin2}</span></td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.role" /></td>
			<td><select name="role">
					<option value="Staff"
						${ param['role'] == "Staff" ? 'selected="selected"' : ""  }>Staff</option>
					<option value="Administrator"
						${ param['role'] == "Administrator" ? 'selected="selected"' : ""  }>Administrator</option>
					<option value="Manager"
						${ param['role'] == "Manager" ? 'selected="selected"' : ""  }>Manager</option>
			</select></td>
		<tr>
			<td><fmt:message key="label.user.email" /></td>
			<td><input type="text" name="email" value="${param['email']}"
				id="origin3" size=15 maxlength=20 tabindex=3 /> <span class="error">${errors.origin3}</span>
			</td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.phone" /></td>
			<td><input type="text" name="phone" value="${param['phone']}"
				id="origin4" size=15 maxlength=20 tabindex=4 /> <span class="error">${errors.origin4}</span>
			</td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.managerid" /></td>
			<td><input type="text" name="managerid" id="origin5"
				value="${param['managerid']}" size=15 maxlength=20 tabindex=5 /> <span
				class="error">${errors.origin5}</span></td>
		</tr>
		<tr>
			<td colspan="2" style="text-align:center">
				<div class="btn-group">
					<input class="btn btn-primary" type="submit" value="Submit">
					<input type="reset" value="Reset" class="btn btn-primary"
						onclick="formReset()">
				</div>
			</td>
		</tr>
	</table>
</form>
<%@include file="footer.jsp"%>